package com.giveu.signature.bean;

import java.util.Date;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Transient;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;

import lombok.Data;

@Data
@JsonInclude(value=Include.NON_NULL)
public class TemplateHtmlParam {
	
	private String tempKey;
	
	private String genModel;
	
	private String html;
	
	private String fastPath;
	
	private Long htmlId;
	
	private List<TemplateParam> templateParams;
	
	private List<TemplateSign> templateSigns;
	
	@Data
	@JsonInclude(value=Include.NON_NULL)
	public static class TemplateParam {
		
		private String paramCode;
		
		private String httpSysName;
		
		private String httpParam;
		
		private String httpUrl;
		
		private Long paramId;

	}

	@Data
	@JsonInclude(value=Include.NON_NULL)
	public static class TemplateSign {
		 /**
	     * 签名的原因
	     */
		private String reason;
	    /**
	     * 签名的地点
	     */
		private String location;
	    /**
	     * 表单域名称
	     */
		private String fieldName;
	    /**
	     * 签章页
	     */
		private Integer pageNum;
	    /**
	     * 签章坐标(1,1,1,1)
	     */
		private String rectangle;
		/**
		 * 签章数据
		 */
		SignatureConf signConf;
	}
	@Data
	@JsonInclude(value=Include.NON_NULL)
	public static class SignatureConf {
		/**
	     * 签章类型(LAYER=图层,SIGN=签名)
	     */
		private Integer signFlag;
	    /**
	     * 签名认证类型(LOCAL=本地)
	     */
		private String signAuth;
		private String keystoreType;
	    /**
	     * 签名文件地址
	     */
		private String keystoreUrl;
	    /**
	     * 签名文件密码
	     */
		private String keystorePassword;
		private String cryptoStandard;
		private String digestAlgorithm;
	    /**
	     * 图章地址
	     */
		private String imageUrl;
	    /**
	     * 图章类型
	     */
		private Integer certificationLevel;
	    /**
	     * 表现形式：仅描述，仅图片，图片和描述，签章者和描述
	     */
		private String renderingMode;
	}
}
